{include file="./headStart.tpl"}
<script type="text/javascript">
$(function() {
  enable_cb();
  $("input:checkbox").click(enable_cb);
});

function enable_cb() {
  if (this.checked) {
    $("input:checkbox").attr("disabled", true);
    $(this).attr("disabled", false);
  } else {
    $("input:checkbox").attr("disabled", false);
  }
}
function checkTechCmp(theObj)
{
  var checkedId   = $(theObj).val();
  var checkStatus = $(theObj).prev().val();
  
  if(checkStatus == 'Y')
  {
    $("#checkBtn").hide("slow");
  }
  else
  {
    $("#checkBtn").show("slow");
  }
}
function checkTechNew(theObj)
{
  var checkedId   = $(theObj).val();
  var checkStatus = $(theObj).prev().val();
  
  if(checkStatus == 'Y')
  {
    $("#checkBtnNew").hide("slow");
  }
  else
  {
    $("#checkBtnNew").show("slow");
  }
}
function checkTechOther(theObj)
{
  var checkedId   = $(theObj).val();
  var checkStatus = $(theObj).prev().val();
  
  if(checkStatus == 'Y')
  {
    $("#checkBtnOther").hide("slow");
  }
  else
  {
    $("#checkBtnOther").show("slow");
  }
}
</script>
{include file="./headEnd.tpl"}
<form name="form1" action="{$smarty.server.PHP_SELF}" method="GET">
<table border='0' cellpadding='1' cellspacing='2' align='center'>
<tr>
  <td class="table1" align="right">
    From Date :
    {html_select_date prefix="fromDate" start_year="-1" end_year="+5" field_order="DMY" month_format="%m" time="$fromDate"}   
  </td>
  <td class="table1" align="right">
    To Date :
    {html_select_date prefix="toDate" start_year="-1" end_year="+5" field_order="DMY" month_format="%m" time="$toDate"}   
  </td>
  <td class="table2">
    <input type="submit" name="submitDateBtn" value="GO..." class="button" />
  </td>  
</tr>		
</table>
</form>
<form action="{$smarty.server.PHP_SELF}" name="form" method="POST">
<center><font style="font-size: 16px"><b>Pending Service Process</b></font></center><br/>
<table border='0' cellpadding='1' cellspacing='2' align='center'>
<tr>
	<td class="table1" align="left" colspan="13">
	  <input type="submit" name="checkBtn" id="checkBtn"  class="buttonComp" value="Tech. Allocation" />&nbsp;&nbsp;
    <input type="submit" name="statusBtn" id="statusBtn"  class="buttonComp" value="Status Update" />
  </td>
</tr>
<tr>
  <td class="table1" align="center" colspan="13"><font style="font-size: 16px"><b> Complaint List </b></font></td>
</tr>
<tr>
  <td class="table1" align="center">&nbsp;</td>
	<td class="table1" align='center'><B>Sr No.</td>
	<td class="table1" align='center'><B>Customer</td>
	<td class="table1" align='center'><B>System </td>
	<td class="table1" align='center'><B>Complaint Date</td>
	<td class="table1" align='center'><B>Target Date </td>
	<td class="table1" align='center'><B>Description </td>
	<td class="table1" align='center'><B>Important Point</td>	
	<td class="table1" align='center'><B>T A Status</td>
	<td class="table1" align='center'><B>Print</td>
	<td class="table1" align='center'><B>Pending Since</td>
</tr>
{section name="sec" loop=$complainCallDetailArray}
<tr>
  <td class="table3">  
    <input type="hidden" name="techAllocated" class="techAllocated" id="techAllocated" value="{$complainCallDetailArray[sec].techAllocated}" />
    <input type="checkbox" class="complainGroup" name="complainGroup[{$complainCallDetailArray[sec].complainServiceId}]" id="complainGroup" value="complainGroup[{$complainCallDetailArray[sec].complainServiceId}]" onclick="checkTechCmp(this);"/>
  </td>
  <td class="table3" align="center">{$smarty.section.sec.rownum}</td>
  <td class="table3" align="left"> {$complainCallDetailArray[sec].companyName}</td>
  <td class="table3" align="left" NOWRAP> {$complainCallDetailArray[sec].categoryName}</td>
  <td class="table3" align="center" NOWRAP> {$complainCallDetailArray[sec].complainDate}</td>
  <td class="table3" align="center" NOWRAP> {$complainCallDetailArray[sec].targetedDate}</td>
  <td class="table3" align="left"> {$complainCallDetailArray[sec].description}</td>
  <td class="table3" align="left"> {$complainCallDetailArray[sec].importantPoint}</td>
  {if $complainCallDetailArray[sec].techAllocated == "Y"}
    <td class="table3" align="center" width="20px"><img src="./images/right.png" height="15" width="25"></td>
  {else}
    <td class="table3" align="center" width="20px"><img src="./images/cross.png" height="15" width="25"></td>
  {/if}
  <td class="table3" align="right"><a href="complainService.php?print=1&lastInsertId={$complainCallDetailArray[sec].complainServiceId}" class="link">Print</a></td>
  <td class="table1" align='center'><B>{$complainCallDetailArray[sec].$differenciat} Days</td>
  {sectionelse}
    <tr><td align="center" colspan="6"> <h2><font color="red"><b>{$msg}</b></font></h2></td></tr>
  {/section}
 </tr>
<tr>
  <td class="table1" align="center" colspan="9">Total :</td>
  <td class="table1" align="right">{$serviceTotal}</td>
  <td class="table1" align="right" colspan="2">{$amountTotal}</td>
</tr>
</table>
</form>
<!--table for New installetion List-->
<br /><br /><br />
<form action="{$smarty.server.PHP_SELF}" name="form1" method="POST">
<table border='0' cellpadding='1' cellspacing='2' align='center'>
<tr>
	<td class="table1" align="left" colspan="13">
	  <input type="submit" name="checkBtnNew" id="checkBtnNew"  class="buttonComp" value="Tech. Allocation" />&nbsp;&nbsp;
    <input type="submit" name="statusBtn" id="statusBtn"  class="buttonComp" value="Status Update" />
  </td>
</tr>
<tr>
  <td class="table1" align="center" colspan="9"><font style="font-size: 16px"><b> New Installation List </b></font></td>
</tr>
<tr>
  <td class="table1" align='center'><B>&nbsp;</td>
  <td class="table1" align='center'><B>Sr No. </td>	
  <td class="table1" align='center'><B>Date </td>	
  <td class="table1" align='center'><B>Target Date </td>	
	<td class="table1" align='center'><B>Customer </td>
	<td class="table1" align='center'><B>Category </td>
	<td class="table1" align='center'><B>Description </td>
	<td class="table1" align='center'><B>T A Status</td>
	<td class="table1" align='center'><B>&nbsp;</td>
</tr>
{assign var="srNo" value="1"}<!--display variable for sr No-->
{section name="sec2" loop=$newInstallDetailArray}
<tr>
 <!-- <td class="table2">  
		<a href="techAllocation.php?newInstallationMasterId={$newInstallDetailArray[sec2].newinstallationMasterId}" class="link">Tech. Allocation</a>
	</td>-->
  <td class="table3" align="center" width="5">  
  <input type="hidden" name="techAllocatedNew" class="techAllocatedNew" id="techAllocatedNew" value="{$newInstallDetailArray[sec2].techAllocated}" />
  <input type="checkbox" class="newGroup" name="newGroup[{$newInstallDetailArray[sec2].newinstallationMasterId}]" id="newGroup" value="newGroup[{$newInstallDetailArray[sec2].newinstallationMasterId}]" onclick="checkTechNew(this);"/>
</td>
	{if $newInstallDetailArray[sec2].display == 1}
	  <td class="table3" align="center" width="5">{$srNo++}</td>
	  <td class="table3" align="left"  width="80" NOWRAP> {$newInstallDetailArray[sec2].installationDate}</td>
	  <td class="table3" align="left"  width="80" NOWRAP> {$newInstallDetailArray[sec2].targetedDate}</td>
	  <td class="table3" align="center" width="180"> {$newInstallDetailArray[sec2].companyName}</td>
	{else}
	  <td class="table3">&nbsp;</td>
	  <td class="table3">&nbsp;</td>
	  <td class="table3">&nbsp;</td>	
	  <td class="table3">&nbsp;</td>
	{/if}
	<td class="table3" align="left" width="100"> {$newInstallDetailArray[sec2].categoryName}</td>
	<td class="table3" align="left" width="700"> {$newInstallDetailArray[sec2].description}</td>
	 {if $newInstallDetailArray[sec2].techAllocated == "Y"}
    <td class="table3" align="center" width="20px"><img src="./images/right.png" height="15" width="25"></td>
  {else}
    <td class="table3" align="center" width="20px"><img src="./images/cross.png" height="15" width="25"></td>
  {/if}
	{if $newInstallDetailArray[sec2].display == 1}
	  <td class="table3" align="left"><a href="newInstallation.php?print=1&newinstallationMasterId={$newInstallDetailArray[sec2].newinstallationMasterId}" class="link">Print</a></td>
	{else}
	  <td class="table3">&nbsp;</td>
	{/if}
	{sectionelse}
	  <tr><td align="center" colspan="6"> <h2><font color="red"><b>{$msg}</b></font></h2></td></tr>
	{/section}
</tr>
</table>
</form>		
<!--table for Demo-->
<br /><br /><br />

<form action="{$smarty.server.PHP_SELF}" name="form2" method="POST">
<table border='0' cellpadding='1' cellspacing='2' align='center'>
<tr>
	<td class="table1" align="left" colspan="13">
	  <input type="submit" name="checkBtnOther" id="checkBtnOther"  class="buttonComp" value="Tech. Allocation" />&nbsp;&nbsp;
    <input type="submit" name="statusBtn" id="statusBtn"  class="buttonComp" value="Status Update" />
  </td>
</tr>
<tr>
  <td class="table1" align="center" colspan="14"><font style="font-size: 16px"><b> Demo List </b></font></td>
</tr>
<tr>
  <td class="table1" align='center'><B>&nbsp;</td>
  <td class="table1" align='center'><B>Sr No. </td>	
  <td class="table1" align='center'><B>Service Type </td>	
	<td class="table1" align='center'><B>Customer </td>
	<td class="table1" align='center'><B>Categoty </td>
	<td class="table1" align='center'><B>Complaint Date</td>	
	<td class="table1" align='center'><B>Target Date</td>
	<td class="table1" align='center'><B>Description</td>
	<td class="table1" align='center'><B>Important Point</td>
	<td class="table1" align='center'><B>T A Status</td>
	<td class="table1" align='center'><B>Print</td>
</tr>
{assign var="srNo" value="1"}<!--display variable for sr No-->
{section name="sec3" loop=$otherArray}
<tr>
 <!-- <td class="table2" NOWRAP>  
		<a href="techAllocation.php?otherServiceId={$otherArray[sec3].otherServiceId}" class="link">Tech. Allocation</a>
	</td>-->
	<td class="table3" align="center">  
	<input type="hidden" name="techAllocatedOther" class="techAllocatedOther" id="techAllocatedOther" value="{$otherArray[sec3].techAllocated}" />
  <input type="checkbox" class="otherGroup" name="otherGroup[{$otherArray[sec3].otherServiceId}]" id="otherGroup" value="otherGroup[{$otherArray[sec3].otherServiceId}]" onclick="checkTechOther(this);"/>
</td>
	<td class="table3" align="center">{$srNo++}</td>
  <td class="table3" align="left">{$otherArray[sec3].serviceType}</td>
  <td class="table3" align="left">{$otherArray[sec3].companyName}</td>
	<td class="table3" align="left" NOWRAP>{$otherArray[sec3].categoryName}</td>
	<td class="table3" align="center" NOWRAP>{$otherArray[sec3].complainDate}</td>
	<td class="table3" align="center" NOWRAP>{$otherArray[sec3].targetedDate}</td>
	<td class="table3" align="left">{$otherArray[sec3].description}</td>
	<td class="table3" align="left">{$otherArray[sec3].importantPoint}</td>
	{if $otherArray[sec3].techAllocated == "Y"}
    <td class="table3" align="center" width="20px"><img src="./images/right.png" height="15" width="25"></td>
  {else}
    <td class="table3" align="center" width="20px"><img src="./images/cross.png" height="15" width="25"></td>
  {/if}
	<td class="table3" align="right"> <a href="serviceList.php?print=1&otherServiceId={$otherArray[sec3].otherServiceId}" class="link">Print</a></td>
	{sectionelse}
	  <tr><td align="center" colspan="6"> <h2><font color="red"><b>{$msg}</b></font></h2></td></tr>
	{/section}
</tr>
</table>
</form>		
{include file="footer.tpl"}